using UnityEngine;
using System.Collections;

/// \class    gkHeadLookControllerTarget
/// \brief  Set the target of an Head look controller
[AddComponentMenu("GK/Engine/Core/Animation/SkeletalController/gkHeadLookControllerTarget")]
public class gkHeadLookControllerTarget : MonoBehaviour 
{
	/// The head look controller
	public gkHeadLookController HeadLookController;
	
	/// The target
	public Transform Target;
	
	/// \brief  Update is called once per frame
	void Update () 
	{
		// Set the head look controller target position
		// based on the target position
		if(Target != null)
		{
			HeadLookController.target = Target.position;
		}
	}
}
